package com.yilizhiyou.controller;

import com.yilizhiyou.common.Result;
import com.yilizhiyou.entity.ScenicSpot;
import com.yilizhiyou.service.WeatherService;
import com.yilizhiyou.service.AiSearchService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import jakarta.annotation.PostConstruct;

@RestController
@RequestMapping("/spots")
@CrossOrigin(origins = "*")
public class ScenicSpotController {

    private static final Logger log = LoggerFactory.getLogger(ScenicSpotController.class);

    @Autowired
    private WeatherService weatherService;

    @Autowired
    private AiSearchService aiSearchService;

    // 模拟景点数据
    private List<ScenicSpot> scenicSpots = new ArrayList<>();

    @PostConstruct
    public void init() {
        initScenicSpots();
    }

    private void initScenicSpots() {
        try {
            // 那拉提草原 - 真实草原风光
            Map<String, Object> weather1 = weatherService.getWeatherBySpotName("那拉提草原", 83.27, 43.26);
            scenicSpots.add(new ScenicSpot(1L, "那拉提草原", "新疆伊犁哈萨克自治州", "自然风光", 
                "世界四大草原之一的亚高山草甸植物区，绿草如茵，牛羊成群，被誉为\"空中草原\"", 
                "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=crop&crop=center", 4.8, 95, 83.27, 43.26,
                weather1.get("condition").toString(), (Integer) weather1.get("temperature"), weather1.get("icon").toString(),
                "[\"哈萨克族文化\", \"草原文化\", \"游牧文化\", \"天马文化\"]",
                "[\"空中草原壮美风光\", \"牛羊成群的自然画卷\", \"日出日落的绝美时刻\", \"四季变换的草原色彩\"]",
                "5-10月，最佳时间6-8月"));
        
        // 赛里木湖 - 高山湖泊美景
        Map<String, Object> weather2 = weatherService.getWeatherBySpotName("赛里木湖", 81.16, 44.60);
        scenicSpots.add(new ScenicSpot(2L, "赛里木湖", "新疆博尔塔拉蒙古自治州", "自然风光", 
            "新疆海拔最高、面积最大的高山湖泊，被誉为\"大西洋最后一滴眼泪\"，湖水清澈如镜", 
            "https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=800&h=600&fit=crop&crop=center", 4.9, 70, 81.16, 44.60,
            weather2.get("condition").toString(), (Integer) weather2.get("temperature"), weather2.get("icon").toString(),
            "[\"蒙古族文化\", \"湖泊文化\", \"生态文化\", \"摄影文化\"]",
            "[\"湖水清澈如镜的倒影\", \"环湖公路的壮美景观\", \"天鹅等珍稀鸟类\", \"四季不同的湖光山色\"]",
            "5-10月，最佳时间6-9月"));
        
        // 伊犁河谷 - 河谷田园风光
        Map<String, Object> weather3 = weatherService.getWeatherBySpotName("伊犁河谷", 81.33, 43.92);
        scenicSpots.add(new ScenicSpot(3L, "伊犁河谷", "新疆伊犁哈萨克自治州", "自然风光", 
            "新疆最富饶的绿洲，被誉为\"塞外江南\"，风光秀丽，物产丰富，是新疆的粮仓", 
            "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=crop&crop=center", 4.7, 85, 81.33, 43.92,
            weather3.get("condition").toString(), (Integer) weather3.get("temperature"), weather3.get("icon").toString(),
            "[\"多民族文化融合\", \"农耕文化\", \"绿洲文化\", \"丝绸之路文化\"]",
            "[\"河谷田园风光\", \"薰衣草花海\", \"苹果花开的春天\", \"丰收的金秋时节\"]",
            "4-10月，最佳时间5-9月"));
        
        // 霍尔果斯口岸 - 边境口岸
        Map<String, Object> weather4 = weatherService.getWeatherBySpotName("霍尔果斯口岸", 80.42, 44.20);
        scenicSpots.add(new ScenicSpot(4L, "霍尔果斯口岸", "新疆伊犁哈萨克自治州", "人文景观", 
            "中国与哈萨克斯坦的重要陆路口岸，丝绸之路经济带的重要节点，见证着中哈友谊", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.5, 60, 80.42, 44.20,
            weather4.get("condition").toString(), (Integer) weather4.get("temperature"), weather4.get("icon").toString(),
            "[\"边境文化\", \"丝绸之路文化\", \"国际贸易文化\", \"中哈友谊文化\"]",
            "[\"国门建筑的雄伟壮观\", \"边境贸易的繁忙景象\", \"界碑的历史意义\", \"跨境合作的现代风貌\"]",
            "全年开放，最佳时间4-10月"));
        
        // 特克斯八卦城 - 古城风貌
        Map<String, Object> weather5 = weatherService.getWeatherBySpotName("特克斯八卦城", 81.84, 43.22);
        scenicSpots.add(new ScenicSpot(5L, "特克斯八卦城", "新疆伊犁哈萨克自治州", "人文景观", 
            "世界唯一保存完整的八卦城，体现了中华文化的博大精深，城市规划独具匠心", 
            "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=crop&crop=center", 4.6, 75, 81.84, 43.22,
            weather5.get("condition").toString(), (Integer) weather5.get("temperature"), weather5.get("icon").toString(),
            "[\"易经文化\", \"八卦文化\", \"中华传统文化\", \"城市规划文化\"]",
            "[\"八卦城全景的独特视角\", \"古城的传统建筑风貌\", \"太极图的完美呈现\", \"历史与现代的完美融合\"]",
            "全年开放，最佳时间5-10月"));
        
        // 昭苏草原 - 油菜花海
        Map<String, Object> weather6 = weatherService.getWeatherBySpotName("昭苏草原", 81.13, 43.15);
        scenicSpots.add(new ScenicSpot(6L, "昭苏草原", "新疆伊犁哈萨克自治州", "自然风光", 
            "新疆最大的春油菜产区，夏季油菜花海壮观，秋季麦田金黄，被誉为\"天马故乡\"", 
            "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=crop&crop=center", 4.7, 80, 81.13, 43.15,
            weather6.get("condition").toString(), (Integer) weather6.get("temperature"), weather6.get("icon").toString(),
            "[\"天马文化\", \"油菜花文化\", \"农耕文化\", \"摄影文化\"]",
            "[\"夏季油菜花海壮观\", \"秋季麦田金黄\", \"天马奔腾的壮观场面\", \"四季不同的田园风光\"]",
            "5-9月，最佳时间6-8月"));
        
        // 果子沟大桥 - 现代桥梁工程
        Map<String, Object> weather7 = weatherService.getWeatherBySpotName("果子沟大桥", 81.16, 44.60);
        scenicSpots.add(new ScenicSpot(7L, "果子沟大桥", "新疆伊犁哈萨克自治州", "人文景观", 
            "新疆第一座斜拉桥，横跨果子沟峡谷，是连接伊犁与乌鲁木齐的重要通道", 
            "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=crop&crop=center", 4.4, 65, 81.16, 44.60,
            weather7.get("condition").toString(), (Integer) weather7.get("temperature"), weather7.get("icon").toString()));
        
        // 薰衣草基地 - 紫色花海
        Map<String, Object> weather8 = weatherService.getWeatherBySpotName("薰衣草基地", 81.25, 43.85);
        scenicSpots.add(new ScenicSpot(8L, "薰衣草基地", "新疆伊犁哈萨克自治州", "自然风光", 
            "中国最大的薰衣草种植基地，夏季紫色花海浪漫迷人，被誉为\"东方普罗旺斯\"", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.6, 90, 81.25, 43.85,
            weather8.get("condition").toString(), (Integer) weather8.get("temperature"), weather8.get("icon").toString()));
        
        // 伊犁河大桥 - 河流桥梁
        Map<String, Object> weather9 = weatherService.getWeatherBySpotName("伊犁河大桥", 81.33, 43.92);
        scenicSpots.add(new ScenicSpot(9L, "伊犁河大桥", "新疆伊犁哈萨克自治州", "人文景观", 
            "横跨伊犁河的重要桥梁，是连接伊宁市两岸的交通枢纽，夕阳西下时景色绝美", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.3, 55, 81.33, 43.92,
            weather9.get("condition").toString(), (Integer) weather9.get("temperature"), weather9.get("icon").toString()));
        
        // 夏塔古道 - 古道风光
        Map<String, Object> weather10 = weatherService.getWeatherBySpotName("夏塔古道", 80.75, 42.95);
        scenicSpots.add(new ScenicSpot(10L, "夏塔古道", "新疆伊犁哈萨克自治州", "自然风光", 
            "古代丝绸之路的重要通道，穿越天山山脉，沿途风光壮美，是徒步爱好者的天堂", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.8, 70, 80.75, 42.95,
            weather10.get("condition").toString(), (Integer) weather10.get("temperature"), weather10.get("icon").toString()));
        
        // 新增更多伊犁特色景点
        Map<String, Object> weather11 = weatherService.getWeatherBySpotName("伊犁河湿地", 81.30, 43.90);
        scenicSpots.add(new ScenicSpot(11L, "伊犁河湿地", "新疆伊犁哈萨克自治州", "自然风光", 
            "伊犁河畔的天然湿地，是候鸟迁徙的重要栖息地，生态环境优美", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.5, 60, 81.30, 43.90,
            weather11.get("condition").toString(), (Integer) weather11.get("temperature"), weather11.get("icon").toString()));
        
        Map<String, Object> weather12 = weatherService.getWeatherBySpotName("伊犁博物馆", 81.32, 43.91);
        scenicSpots.add(new ScenicSpot(12L, "伊犁博物馆", "新疆伊犁哈萨克自治州", "人文景观", 
            "展示伊犁历史文化的重要场所，收藏着丰富的文物和史料", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.2, 45, 81.32, 43.91,
            weather12.get("condition").toString(), (Integer) weather12.get("temperature"), weather12.get("icon").toString()));
        
        } catch (Exception e) {
            // 如果天气服务失败，使用默认天气数据
            System.err.println("天气服务初始化失败，使用默认数据: " + e.getMessage());
            initScenicSpotsWithDefaultWeather();
        }
    }
    
    private void initScenicSpotsWithDefaultWeather() {
        // 使用默认天气数据初始化景点
        scenicSpots.add(new ScenicSpot(1L, "那拉提草原", "新疆伊犁哈萨克自治州", "自然风光", 
            "世界四大草原之一的亚高山草甸植物区，绿草如茵，牛羊成群，被誉为\"空中草原\"", 
            "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=crop&crop=center", 4.8, 95, 83.27, 43.26,
            "晴", 22, "☀️"));
        
        scenicSpots.add(new ScenicSpot(2L, "赛里木湖", "新疆博尔塔拉蒙古自治州", "自然风光", 
            "新疆海拔最高、面积最大的高山湖泊，被誉为\"大西洋最后一滴眼泪\"，湖水清澈如镜", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.9, 70, 81.16, 44.60,
            "多云", 18, "⛅"));
        
        scenicSpots.add(new ScenicSpot(3L, "伊犁河谷", "新疆伊犁哈萨克自治州", "自然风光", 
            "新疆最富饶的绿洲，被誉为\"塞外江南\"，风光秀丽，物产丰富，是新疆的粮仓", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.7, 85, 81.33, 43.92,
            "晴", 25, "☀️"));
        
        scenicSpots.add(new ScenicSpot(4L, "霍尔果斯口岸", "新疆伊犁哈萨克自治州", "人文景观", 
            "中国与哈萨克斯坦的重要陆路口岸，丝绸之路经济带的重要节点，见证着中哈友谊", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.5, 60, 80.42, 44.20,
            "阴", 16, "☁️"));
        
        scenicSpots.add(new ScenicSpot(5L, "特克斯八卦城", "新疆伊犁哈萨克自治州", "人文景观", 
            "世界唯一保存完整的八卦城，体现了中华文化的博大精深，城市规划独具匠心", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.6, 75, 81.84, 43.22,
            "晴", 20, "☀️"));
        
        scenicSpots.add(new ScenicSpot(6L, "昭苏草原", "新疆伊犁哈萨克自治州", "自然风光", 
            "新疆最大的春油菜产区，夏季油菜花海壮观，秋季麦田金黄，被誉为\"天马故乡\"", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.7, 80, 81.13, 43.15,
            "多云", 19, "⛅"));
        
        scenicSpots.add(new ScenicSpot(7L, "果子沟大桥", "新疆伊犁哈萨克自治州", "人文景观", 
            "新疆第一座斜拉桥，横跨果子沟峡谷，是连接伊犁与乌鲁木齐的重要通道", 
            "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=crop&crop=center", 4.4, 65, 81.16, 44.60,
            "小雨", 14, "🌦️"));
        
        scenicSpots.add(new ScenicSpot(8L, "薰衣草基地", "新疆伊犁哈萨克自治州", "自然风光", 
            "中国最大的薰衣草种植基地，夏季紫色花海浪漫迷人，被誉为\"东方普罗旺斯\"", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.6, 90, 81.25, 43.85,
            "晴", 24, "☀️"));
        
        scenicSpots.add(new ScenicSpot(9L, "伊犁河大桥", "新疆伊犁哈萨克自治州", "人文景观", 
            "横跨伊犁河的重要桥梁，是连接伊宁市两岸的交通枢纽，夕阳西下时景色绝美", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.3, 55, 81.33, 43.92,
            "多云", 21, "⛅"));
        
        scenicSpots.add(new ScenicSpot(10L, "夏塔古道", "新疆伊犁哈萨克自治州", "自然风光", 
            "古代丝绸之路的重要通道，穿越天山山脉，沿途风光壮美，是徒步爱好者的天堂", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.8, 70, 80.75, 42.95,
            "雾", 12, "🌫️"));
        
        scenicSpots.add(new ScenicSpot(11L, "伊犁河湿地", "新疆伊犁哈萨克自治州", "自然风光", 
            "伊犁河畔的天然湿地，是候鸟迁徙的重要栖息地，生态环境优美", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.5, 60, 81.30, 43.90,
            "阴", 17, "☁️"));
        
        scenicSpots.add(new ScenicSpot(12L, "伊犁博物馆", "新疆伊犁哈萨克自治州", "人文景观", 
            "展示伊犁历史文化的重要场所，收藏着丰富的文物和史料", 
            "https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=800&h=600&fit=crop&crop=center", 4.2, 45, 81.32, 43.91,
            "晴", 23, "☀️"));
    }

    @GetMapping
    public Result<List<ScenicSpot>> getAllSpots() {
        return Result.success(scenicSpots);
    }

    @GetMapping("/{id}")
    public Result<ScenicSpot> getSpotById(@PathVariable Long id) {
        ScenicSpot spot = scenicSpots.stream()
            .filter(s -> s.getId().equals(id))
            .findFirst()
            .orElse(null);
        
        if (spot != null) {
            return Result.success(spot);
        } else {
            return Result.error("景点不存在");
        }
    }

    @GetMapping("/search")
    public Result<List<ScenicSpot>> searchSpots(@RequestParam String keyword) {
        List<ScenicSpot> results = scenicSpots.stream()
            .filter(spot -> spot.getName().contains(keyword) || 
                           spot.getLocation().contains(keyword) ||
                           spot.getDescription().contains(keyword))
            .collect(Collectors.toList());
        
        return Result.success(results);
    }

    @GetMapping("/ai-search")
    public Result<List<ScenicSpot>> aiSearchSpots(@RequestParam String query) {
        try {
            // 使用AI搜索服务进行智能搜索
            List<ScenicSpot> results = aiSearchService.semanticSearch(query, scenicSpots);
            
            if (results.isEmpty()) {
                // 如果AI搜索没有结果，回退到传统搜索
                results = scenicSpots.stream()
                    .filter(spot -> spot.getName().contains(query) ||
                            (spot.getDescription() != null && spot.getDescription().contains(query)) ||
                            spot.getLocation().contains(query))
                    .collect(Collectors.toList());
            }
            
            return Result.success("AI智能搜索完成", results);
        } catch (Exception e) {
            log.error("AI搜索失败，回退到传统搜索", e);
            // 回退到传统搜索
            return searchSpots(query);
        }
    }

    @GetMapping("/type/{type}")
    public Result<List<ScenicSpot>> getSpotsByType(@PathVariable String type) {
        List<ScenicSpot> results = scenicSpots.stream()
            .filter(spot -> spot.getType().equals(type))
            .collect(Collectors.toList());
        
        return Result.success(results);
    }

    @GetMapping("/popular")
    public Result<List<ScenicSpot>> getPopularSpots() {
        List<ScenicSpot> results = scenicSpots.stream()
            .sorted((a, b) -> Double.compare(b.getRating(), a.getRating()))
            .limit(6)
            .collect(Collectors.toList());
        
        return Result.success(results);
    }

    /**
     * 获取景点详细攻略
     */
    @GetMapping("/{id}/guide")
    public Result<Map<String, Object>> getSpotGuide(@PathVariable Long id) {
        ScenicSpot spot = scenicSpots.stream()
            .filter(s -> s.getId().equals(id))
            .findFirst()
            .orElse(null);
        
        if (spot == null) {
            return Result.error("景点不存在");
        }
        
        Map<String, Object> guide = new HashMap<>();
        guide.put("spot", spot);
        guide.put("travelGuide", getTravelGuide(spot.getName()));
        guide.put("tips", getTravelTips(spot.getName()));
        guide.put("accommodation", getAccommodationInfo(spot.getName()));
        guide.put("transportation", getTransportationInfo(spot.getName()));
        
        return Result.success(guide);
    }

    /**
     * 获取旅行攻略
     */
    private Map<String, Object> getTravelGuide(String spotName) {
        Map<String, Object> guide = new HashMap<>();
        
        switch (spotName) {
            case "那拉提草原":
                guide.put("bestTime", "5-10月，最佳时间6-8月");
                guide.put("duration", "建议游玩1-2天");
                guide.put("highlights", Arrays.asList(
                    "空中草原壮美风光",
                    "哈萨克族民俗体验",
                    "骑马游草原",
                    "观日出日落",
                    "品尝草原美食"
                ));
                guide.put("activities", Arrays.asList(
                    "骑马游草原（100-200元/小时）",
                    "观景台拍照",
                    "体验哈萨克族文化",
                    "品尝手抓肉、奶茶等美食"
                ));
                guide.put("photography", Arrays.asList(
                    "日出时分拍摄草原金光",
                    "日落时分拍摄剪影效果",
                    "骑马人物特写",
                    "草原全景航拍"
                ));
                break;
                
            case "赛里木湖":
                guide.put("bestTime", "5-10月，最佳时间6-9月");
                guide.put("duration", "建议游玩1天");
                guide.put("highlights", Arrays.asList(
                    "环湖公路自驾",
                    "湖水清澈如镜",
                    "天鹅等珍稀鸟类",
                    "湖光山色倒影"
                ));
                guide.put("activities", Arrays.asList(
                    "环湖自驾游（约90公里）",
                    "湖边徒步",
                    "观鸟摄影",
                    "湖边野餐"
                ));
                guide.put("photography", Arrays.asList(
                    "湖水倒影拍摄",
                    "天鹅等鸟类特写",
                    "环湖公路风景",
                    "日出日落湖景"
                ));
                break;
                
            case "薰衣草基地":
                guide.put("bestTime", "6-8月薰衣草花期");
                guide.put("duration", "建议游玩半天");
                guide.put("highlights", Arrays.asList(
                    "紫色花海壮观",
                    "薰衣草精油体验",
                    "浪漫拍照圣地",
                    "东方普罗旺斯"
                ));
                guide.put("activities", Arrays.asList(
                    "花海拍照",
                    "薰衣草精油制作体验",
                    "购买薰衣草产品",
                    "花田漫步"
                ));
                guide.put("photography", Arrays.asList(
                    "花海全景拍摄",
                    "人物花海写真",
                    "薰衣草特写",
                    "夕阳下的花海"
                ));
                break;
                
            case "霍尔果斯口岸":
                guide.put("bestTime", "全年开放，最佳时间4-10月");
                guide.put("duration", "建议游玩2-3小时");
                guide.put("highlights", Arrays.asList(
                    "国门建筑雄伟",
                    "边境贸易繁荣",
                    "中哈友谊见证",
                    "丝绸之路节点"
                ));
                guide.put("activities", Arrays.asList(
                    "参观国门建筑",
                    "了解边境贸易",
                    "购买免税商品",
                    "体验边境文化"
                ));
                guide.put("photography", Arrays.asList(
                    "国门建筑全景",
                    "界碑合影",
                    "边境贸易场景",
                    "丝绸之路文化展示"
                ));
                break;
                
            case "特克斯八卦城":
                guide.put("bestTime", "全年开放，最佳时间5-10月");
                guide.put("duration", "建议游玩半天");
                guide.put("highlights", Arrays.asList(
                    "世界唯一八卦城",
                    "易经文化展示",
                    "古城建筑风貌",
                    "太极图完美呈现"
                ));
                guide.put("activities", Arrays.asList(
                    "八卦城全景参观",
                    "易经文化学习",
                    "古城建筑欣赏",
                    "太极图拍照"
                ));
                guide.put("photography", Arrays.asList(
                    "八卦城全景航拍",
                    "太极图俯拍",
                    "古城建筑特写",
                    "文化展示拍摄"
                ));
                break;
                
            case "昭苏草原":
                guide.put("bestTime", "5-9月，最佳时间6-8月");
                guide.put("duration", "建议游玩1天");
                guide.put("highlights", Arrays.asList(
                    "油菜花海壮观",
                    "天马故乡",
                    "麦田金黄",
                    "田园风光"
                ));
                guide.put("activities", Arrays.asList(
                    "油菜花海拍照",
                    "天马奔腾观赏",
                    "田园风光欣赏",
                    "当地美食品尝"
                ));
                guide.put("photography", Arrays.asList(
                    "油菜花海全景",
                    "天马奔腾瞬间",
                    "麦田金黄景色",
                    "田园风光特写"
                ));
                break;
                
            default:
                guide.put("bestTime", "全年开放");
                guide.put("duration", "建议游玩半天");
                guide.put("highlights", Arrays.asList("自然风光", "文化体验"));
                guide.put("activities", Arrays.asList("观光游览", "拍照留念"));
                guide.put("photography", Arrays.asList("风景拍摄", "人物合影"));
        }
        
        return guide;
    }

    /**
     * 获取旅行贴士
     */
    private Map<String, Object> getTravelTips(String spotName) {
        Map<String, Object> tips = new HashMap<>();
        
        tips.put("clothing", "建议携带防晒用品、帽子、太阳镜，早晚温差大需准备外套");
        tips.put("weather", "新疆地区紫外线强，注意防晒；早晚温差大，注意保暖");
        tips.put("safety", "遵守景区规定，注意安全；保护环境，不乱扔垃圾");
        tips.put("photography", "最佳拍摄时间为日出后1小时和日落前1小时");
        tips.put("food", "可品尝当地特色美食，注意饮食卫生");
        tips.put("shopping", "可购买当地特产，注意价格合理");
        
        return tips;
    }

    /**
     * 获取住宿信息
     */
    private Map<String, Object> getAccommodationInfo(String spotName) {
        Map<String, Object> accommodation = new HashMap<>();
        
        accommodation.put("hotels", Arrays.asList(
            "伊犁宾馆（四星级）",
            "那拉提草原度假村",
            "赛里木湖度假酒店",
            "霍尔果斯口岸酒店"
        ));
        accommodation.put("priceRange", "200-800元/晚");
        accommodation.put("bookingTips", "建议提前预订，旺季价格较高");
        accommodation.put("facilities", Arrays.asList(
            "免费WiFi",
            "停车场",
            "餐厅",
            "24小时前台"
        ));
        
        return accommodation;
    }

    /**
     * 获取交通信息
     */
    private Map<String, Object> getTransportationInfo(String spotName) {
        Map<String, Object> transportation = new HashMap<>();
        
        transportation.put("airport", "伊宁机场，距离市区约15公里");
        transportation.put("train", "伊宁火车站，有直达乌鲁木齐的列车");
        transportation.put("bus", "伊宁汽车站，有前往各景点的班车");
        transportation.put("car", "建议自驾或包车，更灵活方便");
        transportation.put("taxi", "市区内出租车起步价5元");
        transportation.put("tips", "建议提前规划路线，注意路况信息");
        
        return transportation;
    }
}